#:import UIMix ui.base.UIMix
#:import PlayGrid ui.audio_player.interact_track
#:import random random.random

<ToggleColumnContent@RecycleView>:
    viewclass: 'MyToggleButton'
    do_scroll_y: False
    always_overscroll: False
    bar_pos_x: 'top'
    bar_margin: -6

    RecycleBoxLayout:
        default_size: 150, None
        default_size_hint:None,1
        size_hint_x:None
        width:self.minimum_width


<PanelBoxLayout>:
    canvas.before:
        Color:
            rgba: 0, 0, 0, 1
        Rectangle:
            pos:self.pos
            size:self.size
    RecycleView:
        id: id_recycle_view
        data: root.music_list_data
        viewclass: 'PlayGrid'
        do_scroll_x: False
        bar_color: UIMix.scroll_bar_color
        bar_inactive_color: UIMix.scroll_bar_inactive_color
        bar_width: '20dp'

        RecycleGridLayout:
            id: id_grid
            cols: 4
            size_hint: None, None
            width: id_recycle_view.width - 25  # don't draw below scrollbar
            height: self.minimum_height
            default_size_hint: None, None
            default_size: 400, 210

<InteractPanel>:
    canvas.before:
        Color:
            rgba: 0, 0, 0, 1
        Rectangle:
            pos:self.pos
            size:self.size
    orientation: 'vertical'
    size_hint: 1, None
    height: 400
    padding: 20
    BoxLayout:
        size_hint: 1, None
        height: 40
        spacing: 10
        Button:
            size_hint: None, 1
            width: 100
            text:'+添加栏'
            on_release: root.add_toggle_button()
        Button:
            size_hint: None, 1
            width: 130
            text:'+添加播放器'
            on_release: root.add_play_grid_button()
    TabbedPanel:
        id: id_tabbed_panel
        do_default_tab: False


